package test1.Resolve_Prime;

import java.util.Scanner;

public class BigPrime {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int nn = n, mm = m;
        if (n < m) {
            n = n ^ m;
            m = n ^ m;
            n = n ^ m;
        }
        while (n % m != 0) {
            int temp = n;
            n = m;
            m = temp % m;
        }
        System.out.println("最大公因数：" + m);
        System.out.println("最小公倍数：" + nn * mm / m);



    }
}

